<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* 去重案例 */
        const arr = [45, 7, 2, 2, 34, 46, 6, 57, 8, 55, 6, 46];
        const reuslt = [...new Set(arr)]
        console.log(reuslt);


        const str = "asf23sdfgsdgfsafasdfasfasfasfsafsagfdsfg";
        const s = [...new Set(str)].join("")
        console.log(s);
        
    </script>
</body>
</html>